﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using DataSync.Entity;
using log4net;
using Newtonsoft.Json;

namespace DataSync.Proc.Writer
{
    class ConsoleWriter : DataSyncWriterBase
    {
        private static ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        public override int Execute(IList<Dictionary<string, ColData>> data)
        {
            int num = 0;
            foreach (var item in data)
            {
                log.InfoFormat("write info:{0}", JsonConvert.SerializeObject(item));
                num++;
            }
            return num;
        }
    }
}
